import { Outlet, useLocation, useNavigate } from "react-router-dom";
import SideBar from "./component/SideBar";
import './App.css'
import React, { useEffect } from "react";
export default function App():JSX.Element {
  const myLocation = useLocation();
  const myNavigate = useNavigate();
  useEffect(
    ()=>{
       if(myLocation.pathname==="/"){
           myNavigate("/main")
       }
    },[])
  return (
    <div className="app">
      <SideBar/>
      <div className="container">
      <Outlet/>
      </div>
    </div>
  )
}
